import { Space } from 'antd'
import { Button } from 'antd'
import PropTypes from 'prop-types'

const FormButton = (props) => {
  const { search, add, export: exportData, import: importData, download } = props
  return <Space>
    <Button type="primary" onClick={search}>查询</Button>
    <Button type="dashed" onClick={add}>新增</Button>
    <Button type="default" onClick={exportData}>导出</Button>
    <Button type="default" onClick={importData}>导入</Button>
    <Button type="link" onClick={download}>下载模板</Button>
  </Space>
}

FormButton.propTypes = {
  search: PropTypes.func,
  add: PropTypes.func,
  export: PropTypes.func,
  import: PropTypes.func,
  download: PropTypes.func
}

export default FormButton